<template>
  <view>
    <uni-popup ref="tipPopup" type="center" :is-mask-click="true">
      <view class="pop">

        <!-- 提示icon -->
        <view class="tip-img">
          <image v-if="this.type=='success'" src="/static/model1.png" mode=""></image>
		  <image v-if="this.type=='error'" src="/static/model2.png" mode=""></image>
		  <image v-if="this.type== 'cancel'" src="/static/model3.png" mode=""></image>
        </view>
       <view class="tip-info">
          {{title}}
        </view>
    <!--    <view class="sure" @click="sure">
          确定
        </view> -->
      </view>
    </uni-popup>
  </view>
</template>
 
<script>
  export default {
    name:"showTip",
    props:["title","type"],
    data() {
      return {
        
      };
    },
    methods: {
      open() {
        this.$refs.tipPopup.open()
		 setTimeout(() => {
		      this.sure();
		    }, 3000); // 3000 毫秒即 3秒
      },
      sure() {
        this.$refs.tipPopup.close()
      }
    }
  }
</script>
 
<style lang="scss" scoped>
.pop {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    background-color: #2c2c2c;
    border-radius: 16rpx;
    height: 100px;
    z-index: 99;
    width: 100px;
	.tip-img {
	  width: 40px;
	  height: 40px;
	  margin: 20px auto 10px;
	}
	.tip-img image {
	  width: 100%;
	  height: 100%;
	}
	.tip-info {
	  font-size: 14px;
	  color: #fff;
	  text-align: center;
	}
  }
  .title {
    text-align: center;
    font-size: 34rpx;
    font-weight: 500;
    margin-top: 38rpx;
  }
  
  .sure {
    width: 100%;
    border-top: 1rpx solid #d1d1d1;
    height: 112rpx;
    text-align: center;
    line-height: 112rpx;
    color: #02A53C;
    font-size: 34rpx;
    font-weight: 500;
  }
</style>